using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._MaritimeTools._S._57._Management
{
    /// <summary>
    /// <para>Create S-57 Exchange Set</para>
    /// <para>Allows a mariner to view the Electronic Navigational Chart (ENC) datasets in an Electronic Chart Display and Information System (ECDIS) for shipboard navigation.</para>
    /// <para>允许海员在电子海图显示和信息系统 （ECDIS） 中查看电子航海图 （ENC） 数据集，以便进行船上导航。</para>
    /// </summary>    
    [DisplayName("Create S-57 Exchange Set")]
    public class CreateS57ExchangeSet : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateS57ExchangeSet()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_directories">
        /// <para>Input Directories</para>
        /// <para><xdoc>
        ///   <para>Folders that contain at least one S-57 base cell (*.000) and, optionally, any of the following:
        ///   <bulletList>
        ///     <bullet_item>S-57 update datasets  </bullet_item><para/>
        ///     <bullet_item>README.txt file  </bullet_item><para/>
        ///     <bullet_item>Any referenced files in the S-57 cells (*.txt, *.tif, and *.jpg)  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>包含至少一个 S-57 基本单元格 （*.000） 以及（可选）以下任何内容的文件夹：
        ///   <bulletList>
        ///     <bullet_item>S-57 更新数据集</bullet_item><para/>
        ///     <bullet_item>README.txt 文件</bullet_item><para/>
        ///     <bullet_item>S-57 单元格中的任何引用文件（*.txt、*.tif 和 *.jpg）</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_directory">
        /// <para>Output Directory</para>
        /// <para>The location of an empty folder where the ENC_ROOT folder will be written. The folder must be empty for the tool to execute successfully.</para>
        /// <para>将写入 ENC_ROOT 文件夹的空文件夹的位置。该文件夹必须为空，该工具才能成功执行。</para>
        /// </param>
        public CreateS57ExchangeSet(List<object> _in_directories, object _out_directory)
        {
            this._in_directories = _in_directories;
            this._out_directory = _out_directory;
        }
        public override string ToolboxName => "Maritime Tools";

        public override string ToolName => "Create S-57 Exchange Set";

        public override string CallName => "maritime.CreateS57ExchangeSet";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_directories, _out_directory, _layout_format.GetGPValue(), _updates_only.GetGPValue(), _derived_out_directory];

        /// <summary>
        /// <para>Input Directories</para>
        /// <para><xdoc>
        ///   <para>Folders that contain at least one S-57 base cell (*.000) and, optionally, any of the following:
        ///   <bulletList>
        ///     <bullet_item>S-57 update datasets  </bullet_item><para/>
        ///     <bullet_item>README.txt file  </bullet_item><para/>
        ///     <bullet_item>Any referenced files in the S-57 cells (*.txt, *.tif, and *.jpg)  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>包含至少一个 S-57 基本单元格 （*.000） 以及（可选）以下任何内容的文件夹：
        ///   <bulletList>
        ///     <bullet_item>S-57 更新数据集</bullet_item><para/>
        ///     <bullet_item>README.txt 文件</bullet_item><para/>
        ///     <bullet_item>S-57 单元格中的任何引用文件（*.txt、*.tif 和 *.jpg）</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Directories")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_directories { get; set; }


        /// <summary>
        /// <para>Output Directory</para>
        /// <para>The location of an empty folder where the ENC_ROOT folder will be written. The folder must be empty for the tool to execute successfully.</para>
        /// <para>将写入 ENC_ROOT 文件夹的空文件夹的位置。该文件夹必须为空，该工具才能成功执行。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Directory")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_directory { get; set; }


        /// <summary>
        /// <para>Layout Format</para>
        /// <para><xdoc>
        ///   <para>Specifies the directory and folder structure of the exchange set.</para>
        ///   <bulletList>
        ///     <bullet_item>VERSION_LAYOUT— The exchange set will be written in the format ENC_ROOT\CATALOG.031, ENC_ROOT\<Agency>\<ProductName>\<MajorEdition>\<MinorEdition>\<S57Product>, <Referenced Files>. This is the default.</bullet_item><para/>
        ///     <bullet_item>PRODUCT_LAYOUT—The exchange set will be written in the format ENC_ROOT\CATALOG.031, ENC_ROOT\<ProductName>\<S57Product>, <Referenced Files>.</bullet_item><para/>
        ///     <bullet_item>FLAT_LAYOUT—The exchange set will be written in the format ENC_ROOT\CATALOG.031, <S57Product(s)>, <Referenced Files>.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定 Exchange 集的目录和文件夹结构。</para>
        ///   <bulletList>
        /// <bullet_item>VERSION_LAYOUT— 交换集将以 ENC_ROOT\CATALOG.031、ENC_ROOT\<Agency><ProductName>\<MajorEdition>\\<MinorEdition>\<S57Product><Referenced Files> 格式写入。这是默认设置。</bullet_item><para/>
        /// <bullet_item>PRODUCT_LAYOUT—交换集将以 ENC_ROOT\CATALOG.031、ENC_ROOT\<ProductName>\<S57Product> <Referenced Files> 格式写入。</bullet_item><para/>
        /// <bullet_item>FLAT_LAYOUT—交换集将以 ENC_ROOT\CATALOG.031、<S57Product（s）>、<Referenced Files> 格式写入。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Layout Format")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _layout_format_value _layout_format { get; set; } = _layout_format_value._VERSION_LAYOUT;

        public enum _layout_format_value
        {
            /// <summary>
            /// <para>VERSION_LAYOUT</para>
            /// <para>VERSION_LAYOUT— The exchange set will be written in the format ENC_ROOT\CATALOG.031, ENC_ROOT\<Agency>\<ProductName>\<MajorEdition>\<MinorEdition>\<S57Product>, <Referenced Files>. This is the default.</para>
            /// <para>VERSION_LAYOUT— 交换集将以 ENC_ROOT\CATALOG.031、ENC_ROOT\<Agency><ProductName>\<MajorEdition>\\<MinorEdition>\<S57Product><Referenced Files> 格式写入。这是默认设置。</para>
            /// </summary>
            [Description("VERSION_LAYOUT")]
            [GPEnumValue("VERSION_LAYOUT")]
            _VERSION_LAYOUT,

            /// <summary>
            /// <para>PRODUCT_LAYOUT</para>
            /// <para>PRODUCT_LAYOUT—The exchange set will be written in the format ENC_ROOT\CATALOG.031, ENC_ROOT\<ProductName>\<S57Product>, <Referenced Files>.</para>
            /// <para>PRODUCT_LAYOUT—交换集将以 ENC_ROOT\CATALOG.031、ENC_ROOT\<ProductName>\<S57Product> <Referenced Files> 格式写入。</para>
            /// </summary>
            [Description("PRODUCT_LAYOUT")]
            [GPEnumValue("PRODUCT_LAYOUT")]
            _PRODUCT_LAYOUT,

            /// <summary>
            /// <para>FLAT_LAYOUT</para>
            /// <para>FLAT_LAYOUT—The exchange set will be written in the format ENC_ROOT\CATALOG.031, <S57Product(s)>, <Referenced Files>.</para>
            /// <para>FLAT_LAYOUT—交换集将以 ENC_ROOT\CATALOG.031、<S57Product（s）>、<Referenced Files> 格式写入。</para>
            /// </summary>
            [Description("FLAT_LAYOUT")]
            [GPEnumValue("FLAT_LAYOUT")]
            _FLAT_LAYOUT,

        }

        /// <summary>
        /// <para>Updates Only</para>
        /// <para><xdoc>
        ///   <para>Specifies how S-57 update datasets in the input folder will be processed.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The output exchange set will include all the updates but not the S-57 base dataset. If there are no updates, the output will include the S-57 base dataset.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The output exchange set will include the S-57 base dataset and any update datasets. This is the default.
        ///     <para>An S-57 base dataset is required in the input folder when creating an update exchange set.</para>
        ///     </bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何处理输入文件夹中的 S-57 更新数据集。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 输出交换集将包括所有更新，但不包括 S-57 基础数据集。如果没有更新，输出将包括 S-57 基础数据集。</bullet_item><para/>
        /// <bullet_item>未选中—输出交换集将包括 S-57 基础数据集和任何更新数据集。这是默认设置。
        ///     <para>创建更新交换集时，输入文件夹中需要 S-57 基础数据集。</para>
        ///     </bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updates Only")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _updates_only_value? _updates_only { get; set; } = null;

        public enum _updates_only_value
        {
            /// <summary>
            /// <para>INCLUDE_ONLY_UPDATES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INCLUDE_ONLY_UPDATES")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>INCLUDE_ALL</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INCLUDE_ALL")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>S-57 Exchange Set Directory</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("S-57 Exchange Set Directory")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _derived_out_directory { get; set; }


        public CreateS57ExchangeSet SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}